import request from 'utils/request'

export const postData = (data) => {
  return request({
    url: '/formData',
    method: 'post',
    data
  })
}

export const getEditData = (id) => {
  return request({
    url: `/formData/byId?id=${id}`,
    method: 'get'
  })
}

export const getTabelList = (data) => {
  return request({
    url: '/formData',
    method: 'get',
    params: data
  })
}

export const postStatus = (data, method) => {
  return request({
    url: '/formData',
    method,
    params: data
  })
}

export const upDateRow = (data) => {
  return request({
    url: '/formData',
    method: 'post',
    data
  })
}

export const getByScens = (data) => {
  return request({
    url: '/formData/fields/byScene',
    method: 'get',
    params: data
  })
}

export const submitInfo = (data) => {
  return request({
    url: '/formData/formInfo',
    method: 'post',
    data
  }
  )
}
